using UnityEngine;
using System.Collections;

//(c) 2011 VDZ
//made for Ludum Dare 22
//
//Licensed under Creative Commons Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0) 
//
//You are free:
//# to Share — to copy, distribute and transmit the work
//# to Remix — to adapt the work 
//
//Under the following conditions:
//# Attribution — You must attribute the work in the manner specified by the author or licensor
//      (but not in any way that suggests that they endorse you or your use of the work).
//# Noncommercial — You may not use this work for commercial purposes. 
//
//With the understanding that: 
//# Waiver — Any of the above conditions can be waived if you get permission from the copyright holder. 
//# Public Domain — Where the work or any of its elements is in the public domain under applicable law,
//      that status is in no way affected by the license. 
//# Other Rights — In no way are any of the following rights affected by the license:
//  * Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
//  * The author's moral rights;
//  * Rights other persons may have either in the work itself or in how the work is used, such as publicity
//      or privacy rights.

public partial class UnityMain
{
    public static GUIStyle pictureStyle;

    public static GUIStyle buttonStyle;
    public static GUIStyle selectedButtonStyle;
    public static GUIStyleState buttonStyle_normal;
    public static GUIStyleState buttonStyle_selected;
    public static GUIStyleState buttonStyle_hover;

    public static GUIStyle windowstyle;
    public static GUIStyleState windowstyle_normal;

    public static GUIStyle logStyle;
    public static GUIStyleState logStyle_normal;

    public static GUIStyle itemListStyle;
    public static GUIStyleState itemListStyle_normal;

    public static GUIStyle headerStyle;
    public static GUIStyle storyStyle;

    public static GUIStyle messageBoxStyle;

    public static GUIStyle backgroundStyle;
    public static GUIStyleState backgroundStyle_normal;

    public static GUIStyle foregroundStyle;
    public static GUIStyleState foregroundStyle_normal;

    public static void InitializeStyles()
    {
        pictureStyle = new GUIStyle();
        pictureStyle.stretchHeight = true;
        pictureStyle.stretchWidth = true;

        Font font = (Font)Resources.Load("fixedsys500c");

        buttonStyle_normal = new GUIStyleState();
        buttonStyle_normal.background = (Texture2D)Resources.Load("button");
        buttonStyle_selected = new GUIStyleState();
        buttonStyle_selected.background = (Texture2D)Resources.Load("button_selected");
        buttonStyle_hover = new GUIStyleState();
        buttonStyle_hover.background = (Texture2D)Resources.Load("button_hover");

        buttonStyle = new GUIStyle();
        buttonStyle.normal = buttonStyle_normal;
        buttonStyle.hover = buttonStyle_hover;
        buttonStyle.active = buttonStyle_selected;
        buttonStyle.alignment = TextAnchor.MiddleCenter;
        buttonStyle.font = font;
        buttonStyle.wordWrap = true;

        selectedButtonStyle = new GUIStyle();
        selectedButtonStyle.normal = buttonStyle_selected;
        selectedButtonStyle.hover = buttonStyle_selected;
        selectedButtonStyle.active = buttonStyle_selected;
        selectedButtonStyle.font = font;
        selectedButtonStyle.alignment = TextAnchor.MiddleCenter;
        selectedButtonStyle.wordWrap = true;

        windowstyle_normal = new GUIStyleState();
        windowstyle_normal.background = (Texture2D)Resources.Load("button");
        windowstyle = new GUIStyle();
        windowstyle.normal = windowstyle_normal;
        windowstyle.font = font;
        windowstyle.fontSize = 14;
        windowstyle.wordWrap = true;

        logStyle_normal = new GUIStyleState();
        logStyle_normal.background = (Texture2D)Resources.Load("logwindow");
        logStyle = new GUIStyle();
        logStyle.normal = logStyle_normal;
        logStyle.font = font;
        logStyle.fontSize = 14;
        logStyle.wordWrap = true;

        itemListStyle_normal = new GUIStyleState();
        itemListStyle_normal.background = (Texture2D)Resources.Load("itemwindow");
        itemListStyle = new GUIStyle();
        itemListStyle.normal = itemListStyle_normal;
        itemListStyle.font = font;
        itemListStyle.fontSize = 14;
        itemListStyle.alignment = TextAnchor.MiddleCenter;
        itemListStyle.wordWrap = true;

        headerStyle = new GUIStyle();
        headerStyle.font = font;
        headerStyle.fontSize = 24;
        headerStyle.alignment = TextAnchor.MiddleCenter;

        storyStyle = new GUIStyle();
        storyStyle.font = font;
        storyStyle.fontSize = 16;
        storyStyle.alignment = TextAnchor.MiddleCenter;
        storyStyle.wordWrap = true;

        messageBoxStyle = new GUIStyle();
        messageBoxStyle.font = font;
        messageBoxStyle.wordWrap = true;
        messageBoxStyle.alignment = TextAnchor.MiddleCenter;
        messageBoxStyle.fontSize = 14;

        backgroundStyle = new GUIStyle();
        backgroundStyle_normal = new GUIStyleState();
        backgroundStyle_normal.background = (Texture2D)Resources.Load("general2back");
        backgroundStyle.normal = backgroundStyle_normal;

        foregroundStyle = new GUIStyle();
        foregroundStyle_normal = new GUIStyleState();
        foregroundStyle_normal.background = (Texture2D)Resources.Load("general2");
        foregroundStyle.normal = foregroundStyle_normal;
        foregroundStyle.stretchHeight = true;
        foregroundStyle.stretchWidth = true;
    }
}